package eip.util;

import org.apache.activemq.broker.BrokerService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class ActiveMQStarter {
	
	private static Log LOG = LogFactory.getLog(ActiveMQStarter.class);
	
	
	public static void main(String[] args) throws Exception {
        BrokerService broker = new BrokerService();
        broker.addConnector("tcp://localhost:61616");
        broker.setBrokerName("EIP in action");
        broker.setPersistent(false);
        broker.setUseJmx(false);
        broker.start();
        
//      lets wait until we're killed.
        Object lock = new Object();
        synchronized (lock) {
                try {
                        lock.wait();
                } catch (InterruptedException e) {
                        e.printStackTrace();
                }
        }
	}
}
